/*
 * @Description: 档案接收 - 整编 主页面
 * @Author: Rfan
 * @Date: 2022-01-25 17:07:41
 * @LastEditTime: 2023-01-11 10:50:57
 */

import PageLayout from '@/layout/PageLayout';
import { EnumInitRepoName } from '@/view/system/LIBManage/dictionaries';
import PageWrap from './components/PageWrap';
import { ArchiveCollectionContextProvider } from './contexts/ArchiveCollectionContext';
import { CollectionRouterTypeContext } from './contexts/CollectionRouterTypeContext';

interface ICollectionProps {
  routerType?: EnumInitRepoName;
}

export const CollectionMain = (props: ICollectionProps) => {
  const { routerType = EnumInitRepoName.Collection } = props;
  return (
    <CollectionRouterTypeContext.Provider value={{ routerType }}>
      <ArchiveCollectionContextProvider>
        <PageLayout className="flow-mgt" card={false}>
          <PageWrap />
        </PageLayout>
      </ArchiveCollectionContextProvider>
    </CollectionRouterTypeContext.Provider>
  );
};

const ArchiveCollectionMain = () => <CollectionMain />;
export default ArchiveCollectionMain;
